//
//  SettingViewController.h
//  Growth
//
//  Created by 洪波 陈 on 5/30/12.
//  Copyright (c) 2012 MEETStudio. All rights reserved.
//

#import <UIKit/UIKit.h>

#include <sys/sysctl.h>

#import <MessageUI/MessageUI.h>
#import <MessageUI/MFMailComposeViewController.h>

#import "WebConnetionArray.h"

#import "SDDataCache.h"
#import "PublicDatabaseEngine.h"
#import "LoginViewController.h"
#import "GrowthAppDelegate.h"



#import "VersionUpdateClass.h"


#define DEFAULT_SETTING_KEY @"DEFAULT_SETTING_KEY"

@interface SettingViewController : BaseViewController
<WebConnectionArrayDelegate,
UIAlertViewDelegate,
UIPickerViewDelegate,
UIPickerViewDataSource,
UITextFieldDelegate,
MFMailComposeViewControllerDelegate, 
MFMessageComposeViewControllerDelegate, 
UINavigationControllerDelegate,
UIActionSheetDelegate>
{
    BOOL isChange;
    BOOL webSyn;
    
    UIScrollView *myScrollView;
    
    UISwitch *onlyWifiSwitch;
    UISwitch *wifi3GSwitch;
    UISwitch *photoQualitySwitch;
    UISwitch *recordAlertSwitch;
    UILabel *recordAlertTimeLabel;
    UISwitch *lanbaoshuoAlertSwitch;
    UILabel *lanbaoshuoAlertTimeLabel;
    UISwitch *eventAlertSwitch;
    UISwitch *vaccineAlertSwitch;
    UISwitch *trendAlertSwitch;
    
    UIButton *versionTips;
    
    //时间选择
    UIView *timeView;
    UIPickerView *timePickerView;
    
    NSDictionary *webSettingDict;
    
    
    
    UITextField *passwordTextField;

}

@property (nonatomic, retain) IBOutlet UIScrollView *myScrollView;
@property (nonatomic, retain) IBOutlet UISwitch *onlyWifiSwitch;
@property (nonatomic, retain) IBOutlet UISwitch *wifi3GSwitch;
@property (nonatomic, retain) IBOutlet UISwitch *photoQualitySwitch;
@property (nonatomic, retain) IBOutlet UISwitch *recordAlertSwitch;
@property (nonatomic, retain) IBOutlet UILabel *recordAlertTimeLabel;
@property (nonatomic, retain) IBOutlet UISwitch *lanbaoshuoAlertSwitch;
@property (nonatomic, retain) IBOutlet UILabel *lanbaoshuoAlertTimeLabel;
@property (nonatomic, retain) IBOutlet UISwitch *eventAlertSwitch;
@property (nonatomic, retain) IBOutlet UISwitch *vaccineAlertSwitch;
@property (nonatomic, retain) IBOutlet UISwitch *trendAlertSwitch;

@property (nonatomic, retain) IBOutlet UIButton *versionTips;

//时间选择
@property (nonatomic, retain) IBOutlet UIView *timeView;
@property (nonatomic, retain) IBOutlet UIPickerView *timePickerView;

@property (nonatomic, retain) NSDictionary *webSettingDict;

@property (nonatomic, retain) IBOutlet UITextField *passwordTextField;

- (IBAction)photoQualityAction:(id)sender;

- (IBAction)versionUpdate:(id)sender;


//清除用户信息缓存
- (void)clearUserInfo ;

//登陆页面
- (void)loadLoginView;

+ (void)defaultSetting;

- (IBAction)feedbackAction:(id)sender;
- (IBAction)cleanCacheAction:(id)sender;

@end
